<?php
/**
 * Created by PhpStorm.
 * User: micoya
 * Date: 2018/11/6
 * Time: 11:16 AM
 */

namespace app\common\base;

use think\Controller;
use think\Request;
use think\Session;

class AuthenticatedController extends Controller {

    public function __construct(Request $request = null) {
        parent::__construct($request);

        if (Request::instance()->isOptions()) {
            http_response_code(200);
            echo 'OK';
            exit();
        }

        if (!Session::has('admin')) {
            // DieLoginError();
        }

    }

}
